import type { UserInfoRespType, userPageType } from '@/types'
import service from '@/utils/request'

export const getUserInfo = () =>
  service.post<any, UserInfoRespType>('/user/getUserInfo')

export const userPage = (data: any) =>
  service.post<any, userPageType>('/user/page', data)

export const add = (data: any) => service.post<any, void>('/user/add', data)

export const deleteBatch = (data: any) =>
  service.post<any, void>('/user/deleteBatch', data)

export const deleteUser = (data: number) =>
  service.post<any, void>(`/user/deleteById/${data}`)

export const updateUser = (data: any) =>
  service.post<any, void>('/user/updateById', data)
